package com.sinog.biz.service.business;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc AzbjRs统计mapper
 * @author wangxj
 * @date 2021-01-13 19:03
 */
@RestController
public interface AzbjRsService {

    /**
     * 填写信息
     * @param toJsonString toJsonString
     * @return Integer
     */
    @RequestMapping("/api/updateRs")
    Integer updateRs(@RequestParam("toJsonString") String toJsonString);

    /**
     * 定时任务,添加统计图指标
     * @param localCode localCode
     * @param filed filed
     * @param count count
     * @return Integer
     */
    @PostMapping("/api/insertAzbjRs")
    Integer insertAzbjRs(@RequestParam("localCode")String localCode,
                         @RequestParam("filed")String filed,
                         @RequestParam("count")Integer count);

    /**
     * 定时任务，根据localCode和field删除azbj_rs表中的数据
     * @param localCode 省份编码前两位
     * @param field 统计的字段名称
     * @return 删除数量
     */
    @PostMapping("/api/deleteAzbjRs")
    Integer deleteAzbjRs(@RequestParam("localCode")String localCode,
                         @RequestParam("filed")String field);

    /**
     * 批量新增azbjRs
     * @param toJsonString toJsonString
     */
    @PostMapping("/api/batchInsertAzbjRs")
    void batchInsertAzbjRs(@RequestParam("toJsonString") String toJsonString);
}